projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f03dc6e
)
* fns.c: Don't assume string byte-length fits in 'int'.
author
Paul Eggert
<eggert@cs.ucla.edu>
Sat, 18 Jun 2011 16:02:03 +0000
(09:02 -0700)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Sat, 18 Jun 2011 16:02:03 +0000
(09:02 -0700)
src/ChangeLog
patch
|
blob
|
history
src/fns.c
patch
|
blob
|
history
diff --git
a/src/ChangeLog
b/src/ChangeLog
index 75b9327247c605430d39fa18adeb4624efbb359c..ee582c4e4a060a7346c51f51b37eb3f7b6ec8c28 100644
(file)
--- a/
src/ChangeLog
+++ b/
src/ChangeLog
@@
-2,6
+2,7
@@
* fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
Use much-faster test for byte-length change.
+ Don't assume string byte-length fits in 'int'.
* alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
diff --git
a/src/fns.c
b/src/fns.c
index c308e06101f62f3d203f1a5ec283d6af4250aaa2..51b753b31347430b8dcc4fea24c3dc85c4457a67 100644
(file)
--- a/
src/fns.c
+++ b/
src/fns.c
@@
-2169,7
+2169,7
@@
ARRAY is a vector, string, char-table, or bool-vector. */)
unsigned char str[MAX_MULTIBYTE_LENGTH];
int len = CHAR_STRING (charval, str);
EMACS_INT size_byte = SBYTES (array);
-
int
i;
+
EMACS_INT
i;
if (INT_MULTIPLY_OVERFLOW (SCHARS (array), len)
|| SCHARS (array) * len != size_byte)